[SPARK-27961][SQL] DataSourceV2Relation should not have refresh method#24815
[SPARK-27961][SQL] DataSourceV2Relation should not have refresh method#24815gengliangwang wants to merge 3 commits intoapache:masterfrom
Conversation
|
@gengliangwang, the catalog interface has a method to invalidate a source table. Do you want to implement |
|
+1 from me if tests pass. (I saw the comment about the Paruqet -> ORC fix on the previous PR.) |
Yes, I will create a follow-up. This one is to unblock the work of moving DataSourceV2Relation into catalyst. |
|
@gengliangwang . Could you update the PR description a little bit? |
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Logically, this reverts [SPARK-27504][SQL] File source V2: support refreshing metadata cache.
I have two questions.
- Are we going to make https://issues.apache.org/jira/browse/SPARK-27504 as
Invalid? - Why not reverting the invalid SPARK-27504 cleanly?
cc @gatorsmile
| @@ -41,7 +41,7 @@ abstract class MetadataCacheSuite extends QueryTest with SharedSQLContext { | |||
| test("SPARK-16336,SPARK-27504 Suggest doing table refresh " + | |||
| "when encountering FileNotFoundException") { | |||
There was a problem hiding this comment.
The test case name Suggest doing table refresh is not valid anymore DSv2 after this PR. Maybe, recreating is better?
|
@dongjoon-hyun I think we can partially revert it. Some of the works are still valuable:
|
|
Test build #106248 has finished for PR 24815 at commit
|
|
Test build #106252 has finished for PR 24815 at commit
|
sql/core/src/test/scala/org/apache/spark/sql/MetadataCacheSuite.scala
Outdated
Show resolved
Hide resolved
|
Test build #106267 has finished for PR 24815 at commit
|
|
retest this please. |
|
Test build #106271 has finished for PR 24815 at commit
|
|
@dongjoon-hyun Any other concerns on this PR? |
|
Sorry for the delay, @gengliangwang . Yes, for now, this might be the less noisy path because SPARK-27504 was merged long time ago. |
|
Retest this please. |
|
Test build #106296 has finished for PR 24815 at commit
|
|
Retest this please. |
|
Test build #106300 has finished for PR 24815 at commit
|
dongjoon-hyun
left a comment
There was a problem hiding this comment.
+1, LGTM. Merged to master.
cc @gatorsmile since this PR has a history and the context.
|
Thanks @gengliangwang @rdblue @dongjoon-hyun for the quick resolution! |
## What changes were proposed in this pull request? The newly added `Refresh` method in PR apache#24401 prevented the work of moving DataSourceV2Relation into catalyst. It calls `case table: FileTable => table.fileIndex.refresh()` while `FileTable` belongs to sql/core. More importantly, Ryan Blue pointed out DataSourceV2Relation is immutable by design, it should not have refresh method. ## How was this patch tested? Unit test Closes apache#24815 from gengliangwang/removeRefreshTable. Authored-by: Gengliang Wang <gengliang.wang@databricks.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
What changes were proposed in this pull request?
The newly added
Refreshmethod in PR #24401 prevented the work of moving DataSourceV2Relation into catalyst. It callscase table: FileTable => table.fileIndex.refresh()whileFileTablebelongs to sql/core.More importantly, Ryan Blue pointed out DataSourceV2Relation is immutable by design, it should not have refresh method.
How was this patch tested?
Unit test